package summer_vacation.liulee.month8.day20150814;

/**
 * Created by Administrator on 2015/8/14.
 */
public class Java8 {
    public static void main(String[] args) {
        int i,j,sum=0;
        for (i=1;i<11;i++){
               int a=1;
            for (j=1;j<=i;j++){
                a=a*j;//将i的阶乘存放在a中
            }
            sum=sum+a;//阶乘之和存放在sum中
        }
        System.out.println("1!+2!+3!+4!+5!+6!+7!+8!+9!+10!="+sum);
    }
}
